<template>
    <a-drawer v-model:visible="modalVisible" class="custom-class" title="文档" size="large" placement="right">
        <iframe :src="url" width="100%" height="100%"></iframe>
    </a-drawer>
</template>

<script setup>
import { defineProps, defineEmits, computed } from 'vue';

const props = defineProps({
    modelValue: {
        type: Boolean,
    },
    url: {
        type: String,
        default: ''
    }
});

const emit = defineEmits(['update:modelValue']);
const modalVisible = computed({
    get: () => props.modelValue,
    set: v => emit('update:modelValue', v),
});

</script>